package com.atguigu.myrule;

import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Author XuZhuHong
 * @CreateTime 2021/11/4 11:21
 */
@Configuration
public class MySelfRule{
    @Bean
    public IRule myRule(){  //IRule的实例  启动器的检测会根据这个懒定制策略
        return new RandomRule();//定义为随机
    }
}

